package com.hl.hospital.service.impl;

import com.hl.hospital.dao.UserfiveMapper;
import com.hl.hospital.entity.Userfive;
import com.hl.hospital.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.DigestUtils;

import java.util.Date;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: hl
 * @Date: 2020/12/08/19:23
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserfiveMapper userfiveMapper;

    @Override
    public Userfive login(String username, String password)
    {
        Userfive userfive=userfiveMapper.findByName(username);
        if (userfive!=null)
        if (password.equals(userfive.getPassword()))//账号密码正确
        {
            return userfive;
        }
        return null;
    }
}
